<?

require_once($_SERVER['DOCUMENT_ROOT'].'/geograph/download/token.class.php');

require_once($_SERVER['DOCUMENT_ROOT'].'/portals/config.php');

$login_url = 'http://www.geograph.org.uk/auth.php?a='.$CONF['geograph_accesskey'];

$token=new Token;
$token->magic = $CONF['geograph_magic'];
$token->setValue("action", 'authenticate');
$token->setValue("callback", "http://{$_SERVER['HTTP_HOST']}/portals/request.php");
$login_url .= '&amp;t='.$token->getToken();



$_SESSION['continue'] = $_SERVER['REQUEST_URI'];

include($_SERVER['DOCUMENT_ROOT'].'/portals/header.inc.php');

?>

<h2>Login Required</h2>

<p>This action requires logging in, please choose an option below:</p>

<div class="boxleft" style="width:300px">
	
	<big>Login via <span class="nowrap">Geograph Britain and Ireland</span></big>
	
	<p><b>Recommended!</b></p>
	
	<p>You can login securely to this links directory via your Geograph account; 
	click the link below to proceed to the Geograph website, once logged in you will return here. 
	</p> 

	<div><a href="<? echo $login_url; ?>" class="button">Login via <b>geograph.org.uk</b> &gt; &gt;</a></div>
	
	<p>Via this process you do not share your credientials with this site, only your name and user-id.</p>
</div>

<div> 

Alternatively you can create a simple account directly here. You need to provide your name for Creative Commons Licence purposes. <br/><br/>

<form method="post" action="/portals/create_user.php">

Your name: <input type="text" name="realname"/> 

<div style="display:none">
Leave Blank: <input type="text" name="email"/><br/><br/></div>


<input type="submit" name="submit" value="Create"/>

</form>

<div style="color:red">
Simple accounts may be subject to more moderation than a Geograph login. 
To make sure your edits are allowed please make a account at geograph.org.uk using the link on the left. 
</div>

</div>

<br style="clear:both"/>

<?



include($_SERVER['DOCUMENT_ROOT'].'/portals/footer.inc.php');

exit;
